package com.atguigu.spzx.manager.config;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author LT
 * @create 2024-03-13-20:43
 */
@Configuration
@Data
@ConfigurationProperties(prefix = "spzx.minio")
public class MinioProperties implements InitializingBean {

    private String endpoint;
    private String accessKey;
    private String secretKey;
    private String bucket;

    public static String ENDPOINT;
    public static String ACCESS_KEY;
    public static String SECRET_KEY;
    public static String BUCKET;


    @Override
    public void afterPropertiesSet() throws Exception {
        ENDPOINT = this.endpoint;
        ACCESS_KEY = this.accessKey;
        SECRET_KEY = this.secretKey;
        BUCKET = this.bucket;
    }
}
